package util;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import conf.ConfigurationManager;
import constants.Constants;

/**
 * Created by coco-xsj on 2017/7/6.
 */
public class ParamUtils {
    //从用户输入的参数中获取taskid，测试时用户只需输入taskid
    //从数据库中获取完整的task内容
    public static Long getTaskIdFromArgs(String args, String taskType) {

        boolean local = ConfigurationManager.getBoolean(Constants.SPARK_LOCAL);
        if(local) {
            return Long.valueOf(args);
        }
        return 1L;
    }


}
